
#import <UIKit/UIKit.h>
#import "NetWorkingURL.h"
#import "NetWorkModel.h"
#import "NetWorkingURL+ZJ.h"
#import "NetWorkUpLoadModel.h"


#define BASEURL  [NSString stringWithFormat:@"%@/doMobilePost",HTMLURL]

#define UPLOADURL  [NSString stringWithFormat:@"%@/doMobileUpload",HTMLURL]

#define APPUPDATEURL [NSString stringWithFormat:@"%@/mobile/config/ios_version.cfg",HTMLURL] 

typedef void(^NetBlock)(id object);


@interface NetWorkingManager : NSObject

/** 网络请求 */

+ (void)postWithUrlString:(NSString *)url
                Parameter:(NSDictionary *)parameter
                  Success:(NetBlock)successBlock
                     Fail:(NetBlock)failBlock;


//带task的请求
+ (void)ybPostWithUrlString:(NSString *)url Parameter:(NSDictionary *)parameter getTask:(void (^)(NSURLSessionDataTask *))getTask Success:(NetBlock)successBlock Fail:(NetBlock)failBlock;

/** 上传文件、图片 */
+ (void)uploadingWithXMLString:(NSString *)xmlString
                     Parameter:(NetWorkUpLoadModel *)parameter
                       Success:(NetBlock)successBlock
                          Fail:(NetBlock)failBlock;
/** App更新 */
+ (void)appUpdate_Success:(NetBlock)successBlock
                     Fail:(NetBlock)failBlock;
/**
 下载地址
 UrlString 下载地址
 success 文件本地保存地址
 */
+ (void)downLoadWithUrlString:(NSString *)UrlString
                      success:(void(^)(NSURL *localUrlString))success;

@end
